namespace IQIGame.Onigao.GamePlay
{
    /// <summary>
    /// 待命状态，暂不可操作
    /// </summary>
    public class InteractStateStandby : InteractStateBase
    {
        public InteractStateStandby(LevelPlayRegionController regionCtrl) : base(regionCtrl)
        {
        }

        public override LevelInteractState stateId => LevelInteractState.Standby;

        private LevelInteractState _prevStateId;

        public override void OnInit()
        {

        }

        public override bool IsNextStateValid(LevelInteractState nextId)
        {
            return true;
        }

        public override void OnEnter(LevelInteractState prevStateId)
        {
            this._prevStateId = prevStateId;

            regionCtrl.entityCtrl.GetMainCharacter().StopMoveAnimImmediately();
        }

        public override void OnEvent(LevelInteractEvent eventId, params object[] args)
        {
            if (!this.active)
            {
                return;
            }
            switch (eventId)
            {
                case LevelInteractEvent.QuitStandbyState:
                    ChangeState(_prevStateId);
                    break;
            }
        }

        public override void OnExit()
        {

        }

        public override void Dispose()
        {

        }


    }
}
